<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>编辑学校</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
<style>
	.school-left .layui-inline{width: 43%;}
	.layui-inline{padding: 0px;}
	.layui-upload-button{width: 182px;}
</style>
</head>
<body>
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">
                <form id="form1" name="form1" class="layui-form layui-form-pane" method="post" data-dotype="a">
                        <div class="col-md-7 school-left"  style="padding: 0;">
	                        <div class="layui-form-item">
	                        	<div class="layui-inline">
		                            <label class="layui-form-label">学校名称</label>
		                            <div class="layui-input-block">
		                                <input type="text" placeholder="学校名称" id="sch_name" value="{sch_name}" name="sch_name" autocomplete="off" class="layui-input">
		                            </div>
	                            </div>
	                            <div class="layui-inline">
		                            <label class="layui-form-label">短名</label>
		                            <div class="layui-input-block">
		                                <input type="text" placeholder="短名" id="short_name" value="{short_name}" name="short_name" autocomplete="off" class="layui-input">
		                            </div>
	                            </div>
	                        </div>
	                        <div class="layui-form-item">
	                            <div class="layui-inline">
		                            <label class="layui-form-label">学校域名</label>
		                            <div class="layui-input-block">
		                                <input type="text" placeholder="学校域名" id="sch_urls" value="{sch_urls}" name="sch_urls" autocomplete="off" class="layui-input">
		                            </div>
	                            </div>
	                            <div class="layui-inline">
		                            <label class="layui-form-label">组织编号</label>
		                            <div class="layui-input-block">
		                                <input type="text" placeholder="组织编号" id="sch_code" value="{sch_code}" name="sch_code" autocomplete="off" class="layui-input">
		                            </div>
	                            </div>
	                            
	                        </div>
	                        <div class="layui-form-item">
	                            <label class="layui-form-label">学段</label>
	                            <div class="layui-input-block" id="period" name="period" periods="{period}">
	                            	
							    </div>
	                        </div>
	                        <div class="layui-form-item">
	                        	<div class="layui-inline">
		                            <label class="layui-form-label">机构</label>
		                            <div class="layui-input-block">
		                                <select mechanism="{mechanism}" id="mechanism" class="mechanism" name="mechanism">
		                                	<option value="">选择机构</option>
								        </select>
		                            </div>
	                            </div>
	                            <div class="layui-inline">
	                            	<label class="layui-form-label">机构类型</label>
		                            <div class="layui-input-block">
		                                <select mtype="{mtype}" id="mtype" class="mtype" name="mtype">
		                                	<option value="">机构类型</option>
								        </select>
		                            </div>
	                            </div>
	                        </div>
                        </div>
                        <div class="col-md-3 school-right"  style="padding: 0;">
                        	<div class="layui-form-item" style="float: left;">
							    <img id="show_logo" src="{sch_logo}" style="width: 182px;height: 182px;">
							    <div class="">
							        <input type="file" name="file" class="layui-upload-file" id="uplogo">
							    </div>
							</div>
							<input type="text" name="sch_logo" id="sch_logo" value="{sch_logo}" style="display: none;">
                        </div>
                        <div class="layui-form-item">
                        	<div class="layui-inline col-md-3">
	                            <label class="layui-form-label">地区</label>
	                            <div class="layui-input-block">
	                                <select dict="{areaid}" id="dict" class="" name="areaid">
	                                	<option value="010">选择地区</option>
							        </select>
	                            </div>
                            </div>
                            <div class="layui-inline col-md-7">
	                            <label class="layui-form-label">具体地址</label>
	                            <div class="layui-input-block">
	                                <input type="text" placeholder="具体地址" id="addr" value="{addr}" name="addr" autocomplete="off" class="layui-input">
	                            </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                        	<div class="layui-inline col-md-3">
	                            <label class="layui-form-label">联系人</label>
	                            <div class="layui-input-block">
	                                <input type="text" placeholder="联系人" id="linkman" value="{linkman}" name="linkman" autocomplete="off" class="layui-input">
	                            </div>
                            </div>
                            <div class="layui-inline col-md-3">
	                            <label class="layui-form-label">电话</label>
	                            <div class="layui-input-block">
	                                <input type="text" placeholder="联系电话" id="tel" value="{tel}" name="tel" autocomplete="off" class="layui-input">
	                            </div>
                            </div>
                            <div class="layui-inline col-md-3">
	                            <label class="layui-form-label">传真</label>
	                            <div class="layui-input-block">
	                                <input type="text" placeholder="传真" id="fax" value="{fax}" name="fax" autocomplete="off" class="layui-input">
	                            </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline col-md-3">
	                            <label class="layui-form-label">电子邮件</label>
	                            <div class="layui-input-block">
	                                <input type="text" placeholder="电子邮件" id="emails" value="{emails}" name="email" autocomplete="off" class="layui-input">
	                            </div>
                            </div>
                        	<div class="layui-inline col-md-7">
	                            <label class="layui-form-label">简介</label>
	                            <div class="layui-input-block">
	                                <input type="text" placeholder="简介" id="abst" value="{abst}" name="abst" autocomplete="off" class="layui-input">
	                            </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
							<div class="layui-inline col-md-3">
	                            <label class="layui-form-label">上级机构</label>
	                            <div class="layui-input-block">
	                                <select superior="{superior}" id="superior" class="" name="superior">
	                                	<option value="010">选择所属</option>
							        </select>
	                            </div>
                            </div>
							<div class="layui-inline col-md-3">
								<label class="layui-form-label">状态</label>
								<div class="layui-input-block">
									<input type="radio" name="flag" id="flag" title="启用" value="0" checked="checked" />
									<input type="radio" name="flag" id="flag" title="禁用" value="1" />
								</div>
							</div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="text" id="id" name="id" value="{id}" style="display:none;"/>
								<input class="layui-btn" type="button" id="btn_save" value="立即提交"/>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
            </section>
        </div>
    </div>
</div>
    {jsmodel}
   <script type="text/javascript">
        layui.use('system_edit_school');
        var fg="{flag}";
        if(fg==1){
            $(":radio[name='flag'][value='1']").prop("checked", "checked");
        }else{
            $(":radio[name='flag'][value='0']").prop("checked", "checked");
        }
        /*var period="{period}";
        if(period!=''){
        	period+=",";
        	$(".period_list").each(function(){
	        	if($.inArray($(this).attr("period"), period.split(","))!='-1'){
	        		$(this).prop("checked", "checked");
	        	}
	        })
	    }
        var mechanism="{mechanism}";
        if(mechanism!=''){
        	$(".mechanism option").each(function(){
	        	if($(this).val()==mechanism){
	        		$(this).prop("selected", "selected");
	        	}
	        })
	    }
        var mtype="{mtype}";
        if(mtype!=''){
        	$(".mtype option").each(function(){
	        	if($(this).val()==mtype){
	        		$(this).prop("selected", "selected");
	        	}
	        })
	    }*/
        
    </script>
</body>
</html>